home *** CD-ROM | disk | FTP | other *** search
- Subject: Ink for "srcBic" bitmap rendering
- Sent: 4/5/96 12:50 AM
- Received: 4/5/96 7:01 AM
- From: Brad Hutchings, hsd@earthlink.net
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- Hi,
-
- I'm trying to modify ODFBitmap so that it does not draw the white pixels
- over its background. More technically, I want it to use it's bitmap as its
- mask, where mask bits are the non-white pixels. I think this corresponds to
- the srcBic mode described in Inside Macintosh. I'm also having difficulty
- seeing the correspondence betweenthe IM modes and the FW_TransferModes in
- "FWGConst.h".
-
- So, here's some code...
-
- void CBitmapFrame::Draw(Environment* ev, ODFacet* odFacet,
- ODShape* invalidShape)
- {
- FW_CViewContext vc(ev, this, odFacet, invalidShape);
- /*
- ...
- */
-
- FW_CRect usedRect;
- CalcUsedRect(ev, usedRect);
-
- // ** I added the ink, but can't figure out the right mode **
- FW_PInk ink(FW_kRGBWhite, FW_kRGBWhite, FW_kNotClear);
-
- // ----- Use the static rendering method -----
- FW_CBitmapShape::RenderBitmap(vc, fBitmapPart->GetBitmap(ev),
- usedRect, ink);
-
- /*
- ...
- */
- }
-
-
- Thanks,
-
- Brad
-